package cn.boat.router.models;

import lombok.Data;

import java.util.List;

@Data
public class Partition {
    private int partitionId;
    private int backupNumber;
    private int leader;
    private List<Integer> isr;

    public Partition() {
    }

    public Partition(int partitionId, int backupNumber, int leader, List<Integer> isr) {
        this.partitionId = partitionId;
        this.backupNumber = backupNumber;
        this.leader = leader;
        this.isr = isr;
    }

    public int getPartitionId() {
        return partitionId;
    }

    public void setPartitionId(int partitionId) {
        this.partitionId = partitionId;
    }

    public int getBackupNumber() {
        return backupNumber;
    }

    public void setBackupNumber(int backupNumber) {
        this.backupNumber = backupNumber;
    }

    public int getLeader() {
        return leader;
    }

    public void setLeader(int leader) {
        this.leader = leader;
    }

    public List<Integer> getIsr() {
        return isr;
    }

    public void setIsr(List<Integer> isr) {
        this.isr = isr;
    }
}
